#include <iostream>
#include <sstream>
#include <string>
#include <utility>
#include <time.h>
#include <stdio.h> 
#include <exception>
#include "UI.h"

using namespace std;

int main()
{
	HANDLE hConsole;
	hConsole = GetStdHandle (STD_OUTPUT_HANDLE);
	SetConsoleTextAttribute	(hConsole, FOREGROUND_GREEN | FOREGROUND_INTENSITY);

	UI myUI = UI();
	int pageState = 0;

	do{
		myUI.printHeader();
		myUI.printNotification();
		myUI.printAction();
		myUI.printMenu();
		
		pageState = myUI.getPage().showPage(myUI.getMenu().menuState(), myUI.getMenu().getGlobalCategory(), myUI.getMenu().getGlobalMethod(), myUI.getMenu().getGlobalDateRange());	

		myUI.getMenuInput(pageState);
		
		//system("pause");

		myUI.clear();

		
	
	}while(myUI.getMenu().menuState() != exit_app);
	
	return 0;
}